package org.dromara.system.service;

import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.system.domain.bo.SysSolutionDocEnBo;
import org.dromara.system.domain.vo.SysSolutionDocEnVo;
import org.springframework.web.multipart.MultipartFile;

import jakarta.servlet.http.HttpServletResponse;
import java.util.Collection;

/**
 * English Solution Document Service Interface (PDF Folder Solution)
 */
public interface ISysSolutionDocEnService {

    /**
     * Query solution document list
     */
    TableDataInfo<SysSolutionDocEnVo> queryPageList(SysSolutionDocEnBo queryBo, PageQuery pageQuery);

    /**
     * Query solution document detail
     */
    SysSolutionDocEnVo queryById(Long docId);

    /**
     * Update solution document information
     */
    Boolean updateByBo(SysSolutionDocEnBo bo);

    /**
     * Batch delete solution documents
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * Upload PDF folder solution
     *
     * @param files      All PDF files in solution folder (including main PDF, named ending with -main.pdf)
     * @param folderName Solution name
     * @param remark     Remark
     * @return Solution document information
     */
    SysSolutionDocEnVo uploadPdfFolderSolution(MultipartFile[] files, String folderName, String remark);

    /**
     * Preview PDF solution document (redirect to PDF preview address)
     *
     * @param docId       Document ID
     * @param disposition Display mode (inline/attachment)
     * @param response    Response object
     */
    void previewDocument(Long docId, String disposition, HttpServletResponse response) throws Exception;
}

